import Vue from 'vue'
import localStorageService from '../ddd/localStorage.service'

Vue.local = Vue.prototype.$local = localStorageService
Vue.getParamsStr = Vue.prototype.$getParamsStr = (obj) => {
  const keys = Object.keys(obj)
  if (keys.length === 0) {
    return ''
  }
  const res = keys.map(key => { return `${key}=${obj[key]}` }).join('&')
  return res
}